import api from '../index'

export default {
  // _______________NEW_VERSION_START_______________
  // 登录
  login: (
    data: {
      email: string
      password: string
    },
  ) => api.post('user/login', data),
  // 获取用户列表
  getUserList: (
    data: {
      page: number
      page_size: number
    },
  ) => api.get('admin/user_all', {
    params: data,
  }),
  // _______________NEW_VERSION_END_______________

  // ________________OLD_START_______________________
  permission: () => api.get('user/permission', {
    baseURL: '/mock/',
  }),
  // 修改密码
  passwordEdit: (data: {
    password: string
    newpassword: string
  }) => api.post('user/password/edit', data, {
    baseURL: '/mock/',
  }),
  // ________________OLD_END_______________________
}
